<template>
  <div>

  </div>
</template>

<script>
  import {auth} from "../common/cloudbase";

  export default {
    name: 'Home',

    components: {
    },
    mounted() {
      auth.getCurrenUser().then(res=>{
        console.log(res);
      }).catch(()=>{
        alert("登录状态异常");
        gotoLogin();
      });
      function gotoLogin() {
        this.$router.replace("/login")
      }
    }
  }
</script>
